// /////////////////////////////////////////////////////////////////////////////
//
// Name:            CommunicatorScript.h
// Author:          Michael Bartsch
//
// Desc:            This file contains the glue-functions that enable the
//                  interaction between CCommunicator and Lua.
//
// License:         Copyright (C) 2008-2009 Michael Bartsch
//
//                  This program is free software: you can redistribute it
//                  and/or modify it under the terms of the GNU General Public
//                  License as published by the Free Software Foundation,
//                  either version 3 of the License, or (at your option) any
//                  later version.
//
//                  This program is distributed in the hope that it will be
//                  useful, but WITHOUT ANY WARRANTY; without even the implied
//                  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//                  PURPOSE. See the GNU General Public License for more
//                  details.
//
//                  You should have received a copy of the GNU General Public
//                  License along with this program. If not, see
//                  <http://www.gnu.org/licenses/>.
//
// /////////////////////////////////////////////////////////////////////////////

#if !defined(__COMMUNICATORSCRIPT_H_INCLUDED__)
#define __COMMUNICATORSCRIPT_H_INCLUDED__

// Include required header file(s).
#include "../Communicator.h"
#include "./ScriptManager.h"


// Main function:
//! Register all function in this file into the Lua Scripting Language.
//!
//! The functions can be accessed through Communicator:<function> (notice
//! the colon!) or com<function>.
extern void registerCommunicator(lua_State *L);

// Glue functions:
//! Glue function for CCommunicator::serialWrite
extern int lua_com_serialWrite(lua_State *L);
//! Glue function for CCommunicator::serialReconnect
extern int lua_com_serialConnect(lua_State *L);

//! Glue function for CCommunicator::getSelectedDevice
extern int lua_com_getSelectedDevice(lua_State *L);
#endif
